package com.wen.dao;

import com.wen.pojo.Orders;
import com.wen.pojo.Traveller;

import java.util.List;

/**
 * @author 20212
 */
public interface OrdersMapper {
    /**
     * 查询全部
     *
     * @return
     * @throws Exception
     */
    List<Orders> findAll() throws Exception;

    /**
     * 根据id查询
     *
     * @param id
     * @return
     * @throws Exception
     */
    Orders findById(int id) throws Exception;

    /**
     * 根据id删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    int deleteById(int id) throws Exception;

    int deleteOrder_TravellerById(int oid) throws Exception;

    /**
     * 增加订单
     *
     * @return
     * @throws Exception
     */
    int add(Orders orders) throws Exception;

    int findIdByOrderNum(String orderNum) throws Exception;
    int addTraveller(Traveller traveller);
    int addOrderTraveller(int orderId,int travellerId);
    void edit(Orders order);
}
